import request from '../request'
import { AxiosResponse } from 'axios'
import { ResponseData } from '@/types/api/public'
type ConfigType<T = ResponseData> = Promise<AxiosResponse<T>>
/**
 * @desc: 获取数据
 */
export const getPersonnel = (data: any): ConfigType => {
  console.log(data);
  return request({
    url: '/wen/personnel',
    method: 'get',
    params: data
  })
}
/**
 * @desc: 添加数据
 */
export const postPersonnel = (data: any): ConfigType => {
  return request({
    url: '/wen/personnel',
    method: 'post',
    data
  })
}
/**
 * @desc: 修改数据
 */
export const putPersonnel = (data: any): ConfigType => {
  return request({
    url: '/wen/personnel',
    method: 'put',
    data
  })
}
/**
 * @desc: 删除数据
 */
export const deletePersonnel = (data: any): ConfigType => {
  return request({
    url: '/wen/personnel',
    method: 'delete',
    data
  })
}
/**
 * @desc: 获取工作量列表数据
 */
export const getWorkload = (data: any): ConfigType => {
  return request({
    url: '/wen/workload',
    method: 'get',
    params: data
  })
}
/**
 * @desc: 获取工作量列表数据
 */
export const upload = (data: any): ConfigType => {
  return request({
    url: '/uploadfile',
    method: 'post',
  })
}

